#define _CRT_SECURE_NO_WARNINGS 1
int* twoSum(int* nums, int numsSize, int target, int* returnSize) {
    int i, j;
    int* r = malloc(2 * sizeof(int));
    for (i = 0; i < numsSize; i++) {
        int f = 0;
        for (j = i + 1; j < numsSize; j++) {
            if (nums[i] + nums[j] == target) {
                r[0] = i;
                r[1] = j;
                f = 1;
                break;
            }
        }
        if (f == 1)
            break;
    }
    *returnSize = 2;
    return r;
}